package com.sense.feel.login.model.net

import com.sense.feel.login.model.bean.SigInfo
import com.sense.kukoo.common.repo.bean.ConfigBean
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.QueryMap
import com.sense.kukoo.common.repo.bean.ResultBean
import com.sense.kukoo.common.repo.bean.UserInfo

interface LoginApi {


    /** 第三方登录上报用户信息*/
    @POST(LoginUrlConstant.THIRD_LOGIN)
    suspend fun reportUserInfo(
        @Body requestBody: RequestBody
    ): ResultBean<UserInfo>

    /** 手机号码登录获取短信验证码*/
    @POST(LoginUrlConstant.PHONE_LOGIN_GET_SMS)
    suspend fun getVerifyCode(
        @Body requestBody: RequestBody
    ): ResultBean<String>

    /** 手机号登录*/
    @POST(LoginUrlConstant.PHONE_LOGIN)
    suspend fun login(
        @Body requestBody: RequestBody
    ): ResultBean<UserInfo>

    /** 獲取配置信息*/
    @POST(LoginUrlConstant.GET_CONFIG_INFO)
    suspend fun getConfigInfo(
        @Body requestBody: RequestBody
    ): ResultBean<ConfigBean>

    /**
     * 获取腾讯云签名key
     */
    @GET(LoginUrlConstant.IM_SIG)
    suspend fun getImSig(@QueryMap map:Map<String, @JvmSuppressWildcards Any>) : ResultBean<SigInfo>
}
